package db.dto;

import java.io.Serializable;

public class PrescriptionDto implements Serializable, AbstractDto
{
	/** 
	 * This attribute maps to the column ID_PRESCRIPTION in the PRESCRIPTION table.
	 */
	protected int idPrescription;

	/** 
	 * This attribute maps to the column ID_PATIENT in the PRESCRIPTION table.
	 */
	protected int idPatient;

	/** 
	 * This attribute maps to the column ID_DOCTOR in the PRESCRIPTION table.
	 */
	protected int idDoctor;

	/** 
	 * This attribute maps to the column COMMENT in the PRESCRIPTION table.
	 */
	protected String comment;

	/**
	 * Method 'PrescriptionDto'
	 * 
	 */
	public PrescriptionDto()
	{
	}

    public int getId() {
        return this.idPrescription;
    }

    /**
	 * Method 'getIdPrescription'
	 * 
	 * @return int
	 */
	public int getIdPrescription()
	{
		return idPrescription;
	}

	/**
	 * Method 'setIdPrescription'
	 * 
	 * @param idPrescription
	 */
	public void setIdPrescription(int idPrescription)
	{
		this.idPrescription = idPrescription;
	}

	/**
	 * Method 'getIdPatient'
	 * 
	 * @return int
	 */
	public int getIdPatient()
	{
		return idPatient;
	}

	/**
	 * Method 'setIdPatient'
	 * 
	 * @param idPatient
	 */
	public void setIdPatient(int idPatient)
	{
		this.idPatient = idPatient;
	}

	/**
	 * Method 'getIdDoctor'
	 * 
	 * @return int
	 */
	public int getIdDoctor()
	{
		return idDoctor;
	}

	/**
	 * Method 'setIdDoctor'
	 * 
	 * @param idDoctor
	 */
	public void setIdDoctor(int idDoctor)
	{
		this.idDoctor = idDoctor;
	}

	/**
	 * Method 'getComment'
	 * 
	 * @return String
	 */
	public String getComment()
	{
		return comment;
	}

	/**
	 * Method 'setComment'
	 * 
	 * @param comment
	 */
	public void setComment(String comment)
	{
		this.comment = comment;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof PrescriptionDto)) {
			return false;
		}
		
		final PrescriptionDto _cast = (PrescriptionDto) _other;
		if (idPrescription != _cast.idPrescription) {
			return false;
		}
		
		if (idPatient != _cast.idPatient) {
			return false;
		}
		
		if (idDoctor != _cast.idDoctor) {
			return false;
		}
		
		if (comment == null ? _cast.comment != comment : !comment.equals( _cast.comment )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idPrescription;
		_hashCode = 29 * _hashCode + idPatient;
		_hashCode = 29 * _hashCode + idDoctor;
		if (comment != null) {
			_hashCode = 29 * _hashCode + comment.hashCode();
		}
		
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "db.dto.PrescriptionDto: " );
		ret.append( "idPrescription=" + idPrescription );
		ret.append( ", idPatient=" + idPatient );
		ret.append( ", idDoctor=" + idDoctor );
		ret.append( ", comment=" + comment );
		return ret.toString();
	}

}
